package com.xxzx.publicprevention.mapper;

import com.xxzx.publicprevention.pojo.RecordDO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author liyu
 * @since 2020-11-04
 */
public interface RecordMapper extends BaseMapper<RecordDO> {

    void addRecord(RecordDO recordDO);

    List<RecordDO> getRecordByUserId(@Param("user_id") Integer id, @Param("begin_num") Integer beginNum, @Param("row_count") Integer rowCount);

    List<RecordDO> getRecordByUserIdWithTime(@Param("user_id") Integer id, @Param("begin_num") Integer beginNum, @Param("row_count") Integer rowCount, @Param("time_begin") String timeBegin, @Param("time_end") String timeEnd);

    List<RecordDO> getRecordByUserIdWithDetail(@Param("user_id") Integer id, @Param("begin_num") Integer beginNum, @Param("row_count") Integer rowCount, @Param("detail") String detail);

    List<RecordDO> getAllRecord();

    List<RecordDO> getRecordByType(@Param("type") int type);

    void editRecord(RecordDO recordDO);

    RecordDO getRecordById(@Param("id") Integer id);

    List<RecordDO> getRecordByPage(@Param("curr")Integer curr, @Param("size")Integer size);

    List<RecordDO> getRecordByPageAndType(@Param("curr")Integer curr, @Param("size")Integer size, @Param("type")Integer type);

    int getCount();


}
